#ifndef WF_DRAWARC_H
#define WF_DRAWARC_H

#include "pf_previewactioninterface.h"
#include "pf_arc.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw 
 * simple arcs with the center, radius, start- and endangle given.
 *
 */
class GUI_EXPORT WF_DrawArc : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetCenter,       /**< Setting the center point. */
        SetRadius,       /**< Setting the radius. */
        SetAngle1,       /**< Setting the startpoint.  */
        SetAngle2,       /**< Setting the endpoint. */
		SetIncAngle,     /**< Setting the included angle. */
		SetChordLength   /**< Setting carc chord length. */
    };

public:
    WF_DrawArc(PF_Container& container,
                     PF_GraphicView& graphicView);
    ~WF_DrawArc();
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);
	
	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionDrawArc;
	}

    void reset();

    virtual void init(int status=0);
    virtual void trigger();
	
    virtual void mouseMoveEvent(QMouseEvent* e);
    virtual void mouseReleaseEvent(QMouseEvent* e);

	virtual void coordinateEvent(PF_CoordinateEvent* e);
    virtual void commandEvent(PF_CommandEvent* e);
        virtual QStringList getAvailableCommands();
	
    virtual void hideOptions();
    virtual void showOptions();
	
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

	bool isReversed() {
		return data.reversed;
	}

	void setReversed(bool r) {
		data.reversed = r;
	}

protected:
    /**
     * Arc data defined so far.
     */
    PF_ArcAttribute data;
	/**
	 * Commands
	 */
	/*PF_String cmdReversed;
	PF_String cmdReversed2;
	PF_String cmdReversed3;
	*/
};

#endif
